<template>
	<view class="contain">
		 <view class="GridBox">
			 <view class="gtitle"><text class="mid black">学习</text></view>
			 <view class="Night">
					 <view class="gridbg border-r-[1px] border-gray-100" @click="jUrl('/pages/subscribes/subscribes')">
						<view class="iconsbg"><image style="width:150rpx !important;height:150rpx !important;" src="https://yulistudio.oss-cn-shenzhen.aliyuncs.com/images/icons/yuyue.png" mode="aspectFit"></image></view>
						<view class="wordText"><text>我的试课申请</text></view>
					 </view>
					<view class="gridbg border-r-[1px] border-gray-100" @click="jUrl('/pages/myfav/myfav')">
						<view class="iconsbg"><image src="https://yulistudio.oss-cn-shenzhen.aliyuncs.com/images/icons/guanzhu.png" mode="aspectFit"></image></view>
						<view class="wordText"><text>我的收藏</text></view>
					</view>
					<view class="gridbg" @click="jUrl('/pages/mycourse/mycourse')">
						<view class="iconsbg"><image src="https://yulistudio.oss-cn-shenzhen.aliyuncs.com/images/icons/yaoqiu.png" mode="aspectFit"></image></view>
						<view class="wordText"><text>我的课单</text></view>
					</view>
					<view class="gridbg" @click="jUrl('./resetpwd/resetpwd')">
						<view class="iconsbg"><u-icon name="lock-open" color="#2979ff" size="32"></u-icon></view>
						<view class="wordText"><text>修改登录密码</text></view>
					</view>
					<view class="gridbg" @click="loginOut">
						<view class="iconsbg"><u-icon size="30" name="share-square"></u-icon></view>
						<view class="wordText"><text>退出登录</text></view>
					</view>
			 </view>
		 </view> <!-- GridBox End -->
	</view>
</template>

<script setup lang='ts'>
import { ref,reactive } from 'vue'
import {  onLoad } from '@dcloudio/uni-app'
import { userStore } from '@/stores/userStore'
let store = userStore();	
let { hasLogin,userData } = userStore();

const jUrl=(url:string,num?:number)=>{
	uni.$tools.GoUrl(url,num);
}		

const loginOut=()=>{
	uni.showModal({
		title:"系统提示",
		content:"是否退出登录?",
		success:res=>{
			if(res.confirm){
				uni.clearStorageSync();
				uni.clearStorage();
				uni.$tools.GoUrl('/pages/login/login',1);				
			}
		}
	})
}

</script>
<style>
	page{
		background: #f1f1f1;
	}
</style>
<style lang='scss' scoped>
	@import "mine.scss";
</style>